#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
int main()
{
	HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE); // 获取标准输入设备句柄
	INPUT_RECORD inRec;
	DWORD res;
	COORD p0;
	while (1)
	{
		ReadConsoleInput(hInput, &inRec, 1, &res);
		if (inRec.EventType == MOUSE_EVENT && inRec.Event.MouseEvent.dwButtonState == FROM_LEFT_1ST_BUTTON_PRESSED) //鼠标左键
		{
			p0.X = inRec.Event.MouseEvent.dwMousePosition.X;
			p0.Y = inRec.Event.MouseEvent.dwMousePosition.Y;
			SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), p0);
			printf("#\n");
		}
	}

	return 0;
}